package by.bsu.scs.model;

// Generated 05.03.2011 11:02:05 by Hibernate Tools 3.4.0.CR1

import java.sql.Date;

/**
 * 			This class contains Message details.
 * 		
 */
public class Message implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	
	private int messageId;
	private Date messageDate;
	private boolean isRead;
	private User userFrom;
	private User userTo;
	private String messageSubject;
	private String messageBody;
	private Message parentMessage;
	private boolean isFirstMessage;
	private boolean isVisibleSender;
	private boolean isVisibleReceiver;

	
	
	public Message() {
		super();
	}

	public Message(Date messageDate, boolean isRead, User userFrom,
			User userTo, String messageBody, Message parentMessage) {
		this.messageDate = messageDate;
		this.isRead = isRead;
		this.userFrom = userFrom;
		this.userTo = userTo;
		this.messageBody = messageBody;
		this.parentMessage = parentMessage;
	}

	public Message(Date messageDate, boolean isRead, User userFrom,
			User userTo, String messageSubject, String messageBody,
			Message parentMessage, boolean isFirstMessage) {
		this.messageDate = messageDate;
		this.isRead = isRead;
		this.userFrom = userFrom;
		this.userTo = userTo;
		this.messageSubject = messageSubject;
		this.messageBody = messageBody;
		this.parentMessage = parentMessage;
		this.isFirstMessage = isFirstMessage;
	}
	
	public Message(Date messageDate, boolean isRead, User userFrom,
			User userTo, String messageSubject, String messageBody,
			Message parentMessage, boolean isFirstMessage,
			boolean isVisibleSender, boolean isVisibleReceiver) {
		this.messageDate = messageDate;
		this.isRead = isRead;
		this.userFrom = userFrom;
		this.userTo = userTo;
		this.messageSubject = messageSubject;
		this.messageBody = messageBody;
		this.parentMessage = parentMessage;
		this.isFirstMessage = isFirstMessage;
		this.isVisibleSender = isVisibleSender;
		this.isVisibleReceiver = isVisibleReceiver;
	}

	public int getMessageId() {
		return this.messageId;
	}

	public void setMessageId(int messageId) {
		this.messageId = messageId;
	}

	public Date getMessageDate() {
		return this.messageDate;
	}

	public void setMessageDate(Date messageDate) {
		this.messageDate = messageDate;
	}

	public boolean isIsRead() {
		return this.isRead;
	}

	public void setIsRead(boolean isRead) {
		this.isRead = isRead;
	}

	public User getUserFrom() {
		return this.userFrom;
	}

	public void setUserFrom(User userFrom) {
		this.userFrom = userFrom;
	}

	public User getUserTo() {
		return this.userTo;
	}

	public void setUserTo(User userTo) {
		this.userTo = userTo;
	}

	public String getMessageSubject() {
		return this.messageSubject;
	}

	public void setMessageSubject(String messageSubject) {
		this.messageSubject = messageSubject;
	}

	public String getMessageBody() {
		return this.messageBody;
	}

	public void setMessageBody(String messageBody) {
		this.messageBody = messageBody;
	}

	public Message getParentMessage() {
		return this.parentMessage;
	}

	public void setParentMessage(Message parentMessage) {
		this.parentMessage = parentMessage;
	}

	public boolean isIsFirstMessage() {
		return this.isFirstMessage;
	}

	public void setIsFirstMessage(boolean isFirstMessage) {
		this.isFirstMessage = isFirstMessage;
	}

	public boolean isIsVisibleSender() {
		return this.isVisibleSender;
	}

	public void setIsVisibleSender(boolean isVisibleSender) {
		this.isVisibleSender = isVisibleSender;
	}

	public boolean isIsVisibleReceiver() {
		return this.isVisibleReceiver;
	}

	public void setIsVisibleReceiver(boolean isVisibleReceiver) {
		this.isVisibleReceiver = isVisibleReceiver;
	}
	
}
